<?php
	/*
	$sql = $mysqlclass->mysql_my_query("
		CREATE TABLE IF NOT EXISTS `".$setupdata['table_prefix']."local_vars` (
			`id` int(11) NOT NULL auto_increment,
			`name` tinytext NOT NULL,
			`value` longtext NOT NULL,
			PRIMARY KEY  (`id`)
		) ENGINE=MyISAM AUTO_INCREMENT=1 
	", __LINE__, __FILE__);
	
	$core_ver = 0;
	$sql = $mysqlclass->mysql_my_query("SELECT * FROM `".$setupdata['table_prefix']."local_vars` WHERE `name`='version'", __LINE__, __FILE__);
	if (mysql_num_rows($sql) == 0) $sql = $mysqlclass->mysql_my_query("INSERT INTO `".$setupdata['table_prefix']."local_vars` (`id`,`name`,`value`) VALUES ('', 'version', '3')", __LINE__, __FILE__);
	else {
		$row = mysql_fetch_array($sql, MYSQL_ASSOC);
		$core_ver = $row['value'];
	}

	$ver = $core_ver + 1;

	while (file_exists($setupdata['core_dir']."/updates/update_".$ver.".php")){
		include($setupdata['core_dir']."/updates/update_".$ver.".php");
		$ver = $ver + 1;
	}

	if ($core_ver + 1 < $ver){
		$ver = $ver - 1;
		$sql = $mysqlclass->mysql_my_query("UPDATE `".$setupdata['table_prefix']."local_vars` SET `value`='".$ver."' WHERE `name` = 'version'", __LINE__, __FILE__);
	}
	
	unset($core_ver);
	unset($ver);
	*/

?>